import  requests
url='https://i.cnblogs.com/EditPosts.aspx?opt=1'
r=requests.get(url,)
headers={
'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:55.0) Gecko/20100101 Firefox/55.0'
}
r=requests.get(url,headers=headers,verify=False,allow_redirects=False)
print(r.status_code)
print(r.headers['location'])